/**
* @fileOverview 侧边栏收缩
* @author wind-lc
* @version 1.0
*/

// 初始数据
const state = {
  collapsed: null
}
// 修改state数据
const mutations = {
  SET_COLLAPSED: (state, collapsed) => {
    state.collapsed = collapsed
  }
}
// 监听state数据变化(最新状态)
const getters = {
  getCollapsed (state) {
    return state.collapsed
  }
}
// 触发mutations里的方法
const actions = {
  saveCollapsed (context, value) {
    context.commit('SET_COLLAPSED', value)
  }
}
export default { state, getters, mutations, actions }
